package com.azt.api.pojo;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Date;
import java.util.ArrayList;
import java.util.List;

@Table(name = "pro_hot_floor")
public class ProHotFloor implements Serializable {
	
	
	private static final Integer MAX_FLOOR=10;
	//获取0到最大楼层的每一层
	public List<Integer> getFloorList(){
		List<Integer> floors=new ArrayList<Integer>();
		for(int i=1;i<=MAX_FLOOR;i++){
		   floors.add(i);
		}
		return floors;
	}
	
	
    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 楼层
     */
    private Integer floor;

    /**
     * 类目ID
     */
    private Integer categoryId;
    @Transient
    private String categoryName;
    public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public double getMemberPrice() {
		return memberPrice;
	}

	public void setMemberPrice(double memberPrice) {
		this.memberPrice = memberPrice;
	}

	public double getHotPrice() {
		return hotPrice;
	}

	public void setHotPrice(double hotPrice) {
		this.hotPrice = hotPrice;
	}

	public Date getStarttime() {
		return starttime;
	}

	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}

	public Date getEndtime() {
		return endtime;
	}

	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}

	@Transient
    private String productName;
   
	@Transient
    private double memberPrice;
    
	@Transient
    private double hotPrice;
    
	@Transient
    private Date starttime;
   
	@Transient
    private Date endtime;
    
    @Transient
    private List<ProHotProduct> hotProductList;
    
    private Date createtime;
    
    private Date updatetime;

    private static final long serialVersionUID = 1L;

    /**
     * 获取主键
     *
     * @return id - 主键
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置主键
     *
     * @param id 主键
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取楼层
     *
     * @return floor - 楼层
     */
    public Integer getFloor() {
        return floor;
    }

    /**
     * 设置楼层
     *
     * @param floor 楼层
     */
    public void setFloor(Integer floor) {
        this.floor = floor;
    }

    /**
     * 获取类目ID
     *
     * @return categoryId - 类目ID
     */
    public Integer getCategoryId() {
        return categoryId;
    }

    /**
     * 设置类目ID
     *
     * @param categoryId 类目ID
     */
    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    /**
     * @return createtime
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * @param createtime
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    /**
     * @return updatetime
     */
    public Date getUpdatetime() {
        return updatetime;
    }

    /**
     * @param updatetime
     */
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public List<ProHotProduct> getHotProductList() {
        return hotProductList;
    }

    public void setHotProductList(List<ProHotProduct> hotProductList) {
        this.hotProductList = hotProductList;
    }
}